<?php
$post = $_POST;
if($post["userNumber"]!=""){
	require_once('includes/include.php');
	$Helper = new Helper();
	$userNumber = $Helper->formDataFilter($post['userNumber']);
	$userNickName = $Helper->formDataFilter($post['userNickName']);
	$userPasswordR = $Helper->formDataFilter($post['userPasswordR']);
	$dao = new indexdao();
	$add = $dao->register($userNumber,$userNickName,$userPasswordR);
	if ($add=="ok"){
		$user =  $dao->getUser($userNumber,$userPasswordR);
		@session_start();
		$_SESSION["userId"] = $user[0];
		$_SESSION["userNumber"] = $user[1];
		$_SESSION["userName"] = $user[2];
		$_SESSION["userKind"] = $user[5];
		//var_dump($user);
		echo "ok";
	}else if($add=="exsit"){
		echo "exsit";
	}else{
		echo "0";
	}
}
else{
?>
<div style="margin-left:378px;cursor:pointer;" onclick="closeRegisterT()"><img src="style/window_close.png" /></div>
用户账号：<input type="input" name="userAcountR" id="userAcountR" class="loginuserzhanghao" /><br />
用户昵称：<input type="input" name="userNickName" id="userNickName" class="loginuserzhanghao" /><br />
用户密码：<input type="password" name="userPasswordR" id="userPasswordR" class="loginuserzhanghao" /><br />
确认密码：<input type="password" name="userPasswordconfirmR" id="userPasswordconfirmR" class="loginuserzhanghao" /><br />
注册：<input type="button" name="registerR" class="loginSubmit" onclick="doRegister()" style="cursor:pointer;" value="注册" /><br />
<?php
}
?>